﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Wpf4ECharts
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();


            this.ContentRendered += new EventHandler(MainWindow_ContentRendered);
        }

        void MainWindow_ContentRendered(object sender, EventArgs e)
        {
            string path = AppDomain.CurrentDomain.BaseDirectory;
            this.wv2.Source = new Uri(string.Format("{0}js/index.html", path));
            ////webBrowser.Navigate(new Uri(string.Format("{0}js/index.html",path)));
        }


        private void btnZhu_Click(object sender, RoutedEventArgs e)
        {
            string path = AppDomain.CurrentDomain.BaseDirectory;
            this.wv2.Source = new Uri(string.Format("{0}js/index.html", path));
        }

        private void btnPie_Click(object sender, RoutedEventArgs e)
        {
            string path = AppDomain.CurrentDomain.BaseDirectory;
            this.wv2.Source = new Uri(string.Format("{0}js/pie.html", path));
        }

        private void btnZhu2_Click(object sender, RoutedEventArgs e)
        {
            string path = AppDomain.CurrentDomain.BaseDirectory;
            this.wv2.Source = new Uri(string.Format("{0}js/zhu2.html", path));
        }
    }
}
